<include file="inc:header" />
<?php
	$back_url   =   U("index/index") ;
    $back_page = "#Index";
    $back_epage =  $_REQUEST['epage']=="" ? "#uc_borrowed" : "#".$_REQUEST['epage'];
?>
<div class="page" id='{$data.act}'>
	<include file="inc:title" />
<div class="content">
<!-- 这里是页面内容区 -->
<!--投资借款简单详情-->

<div class="detail">
	<div class="mainblok mainborder">
            <div class="detail_tit ">
                <h3>{$data.deal.name}<if condition="$data.deal.is_new eq 1"><em>新</em></if></h3>
            </div>
            <div class="detail_rate">
            	<span>{$data.deal.rate_foramt}<em>%</em></span>
            	<h4>年化收益率</h4>
            </div>
            <div class="detail_row">
            	<div class="it">{$data.deal.loantype|loantypename='type=1'} </div>
            	<div class="it">{$data.deal.min_loan_money_format}起投</div>
            	<div class="it last">期限{$data.deal.repay_time}<if condition=" $data['deal']['repay_time_type'] eq 0">天<else/>个月</if></div>
            </div>

           	<div class="detail_process" id="detail_process" data="<if condition='$data["deal"]["deal_status"] gt 4'>100<else/>{$data['deal']['progress_point']}</if>">
           		<div class="bg">
           			<div class="tip_bar" style="padding-left:{$data.deal.progress_point}%">
	           			<div class="tip" >
	           				<em>{$data.deal.progress_point}%</em>
	           				<span></span>
	           			</div>
	           		</div>
           			<div class="pros" style="width:{$data.deal.progress_point}%"></div>
           		</div>

           	</div>
           	<div class="detail_hs_nd">
           		<div class="f_l tl">
           			已认购
           			<if condition="$data['deal']['uloadtype'] eq 1">
           			<em>{$data.deal.buy_portion}笔</em>
						<else/>
           			<em>{$data.deal.load_money|format_price='f=2'}</em>
           			</if>
           		</div>
           		<div class="f_r tr">
           			<if condition=" $data['deal']['uloadtype'] eq 1">
           			可投份数
           			<em>{$data.deal.need_portion}</em>
						<else/>
           			可投金额
           			<em>{$data.deal.need_money}</em>
           			</if>
           		</div>

           	</div>

        </div><!--mainblok——end-->
		<div class="blank10"></div>

        <div class="mainblok mainborder">
            <div class="detail_list">
                <ul>

          			<li class="bb1">
                		<label>借款编号</label>
                		<div class="list_con">{$data.deal.deal_sn}</div>
                	</li>
                    <li class="bb1">
                        <label>借款金额</label>
                        <div class="list_con">{$data.deal.borrow_amount_format}</div>
                    </li>

                    <li class="bb1">
                        <label>风险等级</label>
                        <div class="list_con">
                        	<if condition=" $data.deal.rish_rank eq 0">低<elseif condition="$data.deal.rish_rank eq 1">中<elseif condition="$data.deal.rish_rank eq 2">高</if>
						</div>
                    </li>
                    <li >
                        <label>剩余时间</label>
                        <div class="list_con">{$data.deal.remain_time_format}</div>
                    </li>
                </ul>
            </div>
        </div>
	<!--mainblok——end-->

		<div class="blank10"></div>

        <div class="mainblok mainborder">
         <if condition=" $data.deal.deal_status eq 0">
            <div class="detail_list">
                <ul>
                    <li class="bb1">
                        <label>可用余额</label>
                        <div class="list_con">
                        	<em class="f_red" data="{{$data.user_money}}">{$data.user_money|format_price='f=2'}</em>元
							<a href="#" onclick="RouterURL('{:U('ucincharge/index')}','#Ucincharge',2);" class="linkbtn">我要充值</a>
						</div>
                    </li>
					<if condition="$data.deal.uloadtype eq 1">
					 <li class="bb1">
                        <label>投标金额</label>s
                        <div class="list_con">
							 	<div class="nun_choose ">
									<div id="deal-intro" class="c_number-box" >
										<a class="c_number Minus pull-left" rel="-">-</a>
										<input id="deal_id" type="hidden" value="{$data.deal.id}"  />
										<input id="buy_number" name="buy_number" type="hidden" value="{$data.deal.min_loan_money}" >
									    <input type="text" value="1" class="nuns pull-left"  autocomplete="off" name="pay_inmoney" id="pay_inmoney"/>
									    <a class="c_number Plus pull-left" rel="+">+</a>
									</div>
								</div>
                        </div>
                     </li>
					<li class="bb1">
                     	 <label>预计收益</label>
                     	<div class="list_con "><span class="J_u_money_sy f_red">0.00</span></div>
                     </li>
                    <else/>
					 <li class="bb1">
                        <label >投标金额</label>
                        <div class="list_con ">
                        	<input id="deal_id" type="hidden" value="{$data.deal.id}"  />
            				<input id="pay_inmoney" name="pay_inmoney" class="ipt pull-left" placeholder="请输入投资金额" type="text" style="width:50%"/>

                        </div>
                     </li>
                     <li class="bb1">
                     	 <label>预计收益</label>
                     	<div class="list_con "><span class="J_u_money_sy f_red">0.00</span></div>
                     </li>
					</if>
                    <if condition="false && $data.interestrate_list">
                     <li class="bb1">
                        <label>使用加息券</label>
                        <div class="list_con">
                            <label class="ui-checkbox " rel="use_interestrate" >
                                <input type="checkbox" class='mt' value="1" name="use_interestrate" id="use_interestrate"/>
                            </label>
							<span class="f_red">加息券与红包不可同时使用</span>
                        </div>
                    </li>
                    </if>
					<if condition=" $data.ecv_list">
					<li class='ecv_row bb1'>
                        <label>使用红包</label>
                        <div class="list_con" style="height:5rem">
                        	<select name="ecv_id" id="ecv_id" class="select">
                        		<option value="0">选择红包</option>
								<foreach name="data.ecv_list" item="ecv">
								<option value="{$ecv.id}">{$ecv.name}[抵{$ecv.money}元]</option>
								</foreach>
                        	</select>
							<span class="f_red">超出部分不返还</span>
                        </div>
                     </li>
					</if>

                    <if condition="$data.interestrate_list">
                    <li class='interestrate_row bb1' style="display:none;">
                        <label>选择加息券</label>
                        <div class="list_con">
                            <select name="interestrate_id" id='interestrate_id' class="select">
                                <option>选择加息券</option>
                                <foreach name="data.interestrate_list" item="interestrate">
                                <option value="{$interestrate.id}">{$interestrate.name}[{$interestrate.rate_format}]</option>
                                </foreach>
                            </select>
						</div>
                    </li>
                   </if>
					<li >
                        <label>支付密码</label>
                        <div class="list_con">
                        <input id="pay_inmoney_password" class="ipt pull-left" type="password" placeholder="请输入支付密码" style="width:50%" />
                        <if condition="$data.is_login eq 0">
							<a href="#" onclick="RouterURL('{:U('login/index')}','#Login');" class="linkbtn pull-right " style="font-size:0.5rem;">设置支付密码</a>
							<else/>
							<a href="#" onclick="RouterURL('{:U('resetpaypwd/index')}','#Resetpaypwd',2)" class="linkbtn pull-right"  style="font-size:0.5rem;">设置支付密码</a>
							</if>
						</div>
					 </li>
                </ul>
            </div>
			</if>
		</div></div>
	<!--mainblok——end-->
			<div class="blank10"></div>
	<div class="w_b but_box_parent padding">
		<div class="w_b_f_1 but_box">
			<a href="#" onclick="RouterURL('{:U('dealmobile/index' ,array('id'=>$data['deal']['id']))}','#Dealmobile',2);"  class=" but_this" >查看详情</a>
		</div>
		<div class="w_b_f_1 but_box">
			<if condition="$data['deal']['is_delete'] eq 2">
				<div class="bg_dbdbdb but_this">待发布</div>
			<elseif condition="$data.deal.is_wait eq 1">
				<div class="bg_dbdbdb but_this">未开始</div>
			<elseif condition="$data.deal.deal_status eq 5">
				<div class="bg_dbdbdb but_this">还款完毕</div>
			<elseif condition="$data.deal.deal_status eq 4">
				<div class="bg_dbdbdb but_this">还款中</div>
			<elseif condition="$data.deal.deal_status eq 0">
				<div class="bg_dbdbdb but_this"><if condition="$data.deal.need_credit eq 0">等待审核<else />等待材料</if></div>
			<elseif condition="$data['deal']['deal_status'] eq 1">
				<div id="pay_deal" class="bg_ea544a but_this">我要投资2</div>
			<elseif condition="$data.deal.deal_status eq 2">
				<div class="bg_dbdbdb but_this">已满标</div>
			<elseif condition="$data.deal.deal_status eq 3">
				<div class="bg_dbdbdb but_this">已流标</div>
			<elseif condition="$data.deal.deal_status eq 1 and $data.deal.remain_time lt 0">
				<div class="bg_dbdbdb but_this">募集结束</div>
			</if>
			<if condition="$data['deal']['deal_status'] eq 1">
				<div id="pay_deal_del" class="bg_ea544a but_this">我要投资</div>
			</if>

	</div>

</div>
<include file="inc:footer" />